package com.dzl.util.wx;


import com.dzl.config.ApplicationConfiguration;

import java.io.File;

/**
 * 微信相关配置类
 * @date 2020/11/24 21:00
 * @author lishunxing
 */
public class WxConfig {

	/**
	 * 退款地址
	 */
	public static final String  REFUND_URL = "https://api.mch.weixin.qq.com/secapi/pay/refund";

	/**
	 * 支付地址     统一下单地址
	 */
	public static final String  PAY_UNIFIEDORDER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";

	// 微信登陆URL
	public static final String XCX_OAUTH_URL = "https://api.weixin.qq.com/sns/jscode2session";

	/**
	 * 微信小程序  appid  企业福利
	 */
	public static final String WX_XCX_APPID = "wx451f203862d10199";

	/**
	 * 微信小程序 秘钥  企业福利
	 */
	public static final String WX_XCX_SECRET = "6540d76ca3775c44f2e7f7d2f8821b4b";


	/**
	 * 微信小程序  appid  企业福利
	 */
	public static final String WX_XCX_SASS_APPID = "wx956b295d5a91cb40";

	/**
	 * 微信小程序 秘钥  企业福利
	 */
	public static final String WX_XCX_SASS_SECRET = "c7e98f15fbd1bd87e9987358f75f4b45";


	/**
	 * 微信商户号  企业福利
	 */
	public static final String WX_PARTNER = "1608415070";

	/**
	 * 微信商户Key  企业福利
	 */
	public static final String WX_PARTNER_KEY = "DingzhilianQiyefuli20210526Jishu";

	/**
	 * 公众号ID
	 */
	public static final String WX_APP_ID = "wxef4690e7b6c5931a";
	/**
	 * 公众号秘钥
	 */
	public static final String WX_APP_SECRET = "9b0075ed99f43cd71afe1dfe1be2b321";

	//微信沙箱测试信息
	public static final String WX_TEST_TOKEN = "guoke";

	//微信沙箱测试信息
	public static final String WX_TEST_APPID = "wx212639d35b0d905c";

	//微信沙箱测试信息
	public static final String WX_TEST_SECRET = "40973485beda39f5fb2ae7bf9588a3bc";

	/**
	 * 以下为微信公众号模板常量信息
	 **/
	public static final String AGENT_PAY_TEMPLATE_ID = "l8PKLyH_UfLjjZ2GMQ0D6PoYAmrXsug3ShYDMlwOGH4";// 代付消息通知

	/**
	 * 以下为微信小程序模板常量信息
	 */
	public static final String PAY_NOTIFY_SETTLEMENT_URL = ApplicationConfiguration.getDomain() + "/applet/welfareOrder/updateSettlementNotify";
	/**
	 * 电影订单微信支付回调-福力兔
	 */
	public static final String PAY_NOTIFY_MOVIE_ORDER_APPLET_URL = ApplicationConfiguration.getDomain() + "/applet/welfareMovieOrder/updateSettlementNotify";
	/**
	 * 电影订单微信支付回调-兔福宝
	 */
	public static final String PAY_NOTIFY_MOVIE_ORDER_SAASAPPLET_URL = ApplicationConfiguration.getDomain() + "/saasapplet/welfareMovieOrder/updateSettlementNotify";

	/**
	 * 以下为微信小程序模板常量信息
	 */
	public static final String ACTIVITY_HELP_TEMPLATE_ID = "_bamu7fDBoxqswOJ5GAtISwXBM0__I8YrzPKxObgMGk";// 活动助力进度提醒

	public static final String ACTIVITY_CHANGE_TEMPLATE_ID = "Q7oLhQ3o47sh1uuwQ9jDzzr9eesDJ-TcAaxEdVruieE";// 活动状态变更通知

	/**
	 * 获取小程序支付证书路径
	 * @date 2020/7/7 9:08
	 * @author lishunxing
	 * @param
	 * @return
	 */
	public static String getXcxCertPath(){
		String path = "";
		if (FileUtil.isOSLinux()) {
			path = File.separator + "opt" + File.separator + "cert"  + File.separator + "apiclient_cert.p12";
		} else {
			path = "D:" + File.separator + "cert" + File.separator + "apiclient_cert.p12";
		}
		return path;
	}
}
